<?php
$appPath = str_replace($_SERVER["DOCUMENT_ROOT"], "", dirname(__FILE__)) . DIRECTORY_SEPARATOR;
$rootPath = dirname(__FILE__) . DIRECTORY_SEPARATOR;
$rootUrl = sprintf("http://%s/%s/",$_SERVER['HTTP_HOST'],trim($appPath,'/'));
$environment = (file_exists($rootPath . 'db')) ? 'development' : 'production';

require 'core/config.php';

Config::$environment = $environment;
Config::$rootUrl = $rootUrl;
Config::$rootPath = $rootPath;

require 'config/app.php';
require 'core/Database/base.php';
?>
